package com.gba.mark.action.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gba.mark.action.entity.Action;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ActionMapper extends BaseMapper<Action> {

    @Update("UPDATE `action` \n" +
            "SET `action` = 1 \n" +
            "WHERE `origin_id` = #{origin_id}\n"+
            "AND   `user_id`   = #{user_id}\n"+
            "AND   `group_id`  = #{group_id}")

    void skipOrigin(@Param("origin_id") Integer origin_id,
                    @Param("user_id") Integer user_id,
                    @Param("group_id") Integer group_id);



}
